<%@page import="com.bss.dao.PaymentDao"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="java.text.SimpleDateFormat" %>
<%@page import="java.text.DateFormat" %>
<%@page import="java.util.Calendar"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>DAILY DEPOSIT & REFUND REPORT</title>
 <!-- calendar stylesheet -->
  <link rel="stylesheet" type="text/css" media="all" href="CHECKINOUT/calendar-win2k-cold-1.css" title="win2k-cold-1" />
  
  <link rel="stylesheet" href="style.css" type="text/css">


  
  <!-- main calendar program -->
  <script type="text/javascript" src="CHECKINOUT/calendar.js"></script>

  <!-- language for the calendar -->
  <script type="text/javascript" src="CHECKINOUT/lang/calendar-en.js"></script>

  <!-- the following script defines the Calendar.setup helper function, which makes
       adding a calendar a matter of 1 or 2 lines of code. -->
  <script type="text/javascript" src="CHECKINOUT/calendar-setup.js"></script>
 <script language="JavaScript" type="text/JavaScript" src="java/javascript.js"></script>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="java/base.js"></SCRIPT>
<script language="JavaScript" src="java/tabel.js" type="text/javascript"></script>
<script language="javascript" SRC="java/JS/validation.js" TYPE="text/javascript"></script>
</head>
<%
    	session.setAttribute("Event","PaymentCommand");
    	session.setAttribute("action", 5);
    	String errMsg="";
    	
    	if(session.getAttribute("Error")!=null)
    	{
    		 errMsg=session.getAttribute("Error").toString();
    		 session.removeAttribute("Error");
    	}
    	
    	DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm aaa");
    	java.util.Date date = new java.util.Date();
    	String datetime = dateFormat.format(date);
    	Calendar cal = Calendar.getInstance();
    	cal.add(Calendar.DATE, 7);
    	String newdate = dateFormat.format(cal.getTime());

    	
    %>
<body background="img/bg.gif">
	<a href="/BSS/reports.jsp" style="color: white">Back to Reports</a>
	<form action="/BSS/BSSServlet" name="login" method="post" >
	<table align="center">
		<tr style=" height : 52px;">
			<td valign="top" align="center" style="color:white; font-family: sans-serif; text-decoration: underline;">
				<h2>DAILY DEPOSIT & REFUND REPORT</h2>
			</td>
		</tr>
		<tr>
			<td align="center">
				<div style="color: red; font-weight: bold; background-color: silver;text-align: left; width : 260px;">
					Last Updated: <%=PaymentDao.latestDailyAccountReportDate() %>
				</div>
				<table align="center" style="color: white; background-color: #304550; font-family: sans-serif; font-size: small;">
					<tr style=" height : 42px;">
						<td colspan="5" align="right" valign="top">
							Select Date <input type="text" name="date" id="f_date_b" value="<%=datetime %>"/><button type="reset" id="f_trigger_b" style=" width : 41px;">...</button>
								<script type="text/javascript">
			    					Calendar.setup({
			        				inputField     :    "f_date_b",      // id of the input field
			        				//ifFormat       :    "%m/%d/%Y %I:%M %p",       // format of the input field
			        				ifFormat       :    "%d/%m/%Y %I:%M %p",       // format of the input field
			       					 showsTime      :    true,            // will display a time selector
			       					 button         :    "f_trigger_b",   // trigger for the calendar (button ID)
			       					 singleClick    :    false,           // double-click mode
			       					 step           :    1                // show all years in drop-down boxes (instead of every other year as default)
			   									 });
								</script>
						</td>					
					</tr>
				</table>			
			</td>				
		</tr>		
		<tr>
			<td colspan="5">
				<div align="center">
					<input type="submit" value="Generate Report">
				</div>
			</td>
		</tr>
	</table>	
	</form>
</body>
</html>